package Banco;

import Class.*;
import dataBase.conexao;
import java.sql.Connection;
import java.sql.SQLException;



public  class Inserts {
        public void insert_user(User u) throws SQLException, ClassNotFoundException{        
        Connection c = null;
        conexao connect = new conexao();
        c = connect.getConnection();
        java.sql.Statement stm = c.createStatement();        
        String nome = u.getNome();
        Integer senha = u.getSenha();
        String id = u.getId();
        Integer exclusao = 0;
        String sql = "INSERT INTO helpdeskweb.user (nome,senha,id,exclusao) VALUES (";
               sql += "'" +(nome)+"',";
               sql += "'" +(senha)+"',";
               sql += "'" +(id)+"',";
               sql += "'" +(exclusao)+"'";
               sql += ")";
        stm.executeUpdate(sql);              
        c.close();
    }
}